package com.bjpowernode.crm.settings.mapper;

import com.bjpowernode.crm.settings.domain.User;

import java.util.List;
import java.util.Map;

public interface UserMapper {
    int deleteByPrimaryKey(String id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     *  通过用户名和密码查询用户从而验证用户登录
     * @param loginMap(用户名和密码封装在map集合当中)
     * @return
     */
    User selectUserByUsernameAndPassword(Map<String, Object> loginMap);

    /**
     * 通过用户名判断用户是否存在
     * @param loginAct
     * @return
     */
    User selectUserByUsername(String loginAct);

    List<User> selectUsers();
}